import { DomEditor } from '@wangeditor/editor'

export default function (editor) {
    const { isInline, isVoid } = editor;
    const newEditor = editor;

    newEditor.isInline = function (elem) {
        const type = DomEditor.getNodeType(elem);
        if (type === "ssml-break") return true;
        return isInline(elem);
    };

    newEditor.isVoid = function (elem) {
        const type = DomEditor.getNodeType(elem);
        if (type === "ssml-break") return true;
        return isVoid(elem);
    };

    return newEditor;
}
